package com.blb.zy_community.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zy_community.entity.SysPost;
import com.blb.zy_community.mapper.SysPostMapper;
import com.blb.zy_community.service.ISysPostService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 岗位信息表 服务实现类
 * </p>
 *
 * @author 二组
 * @since 2023-06-18
 */
@Service
public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> implements ISysPostService {
    @Autowired
    private SysPostMapper postMapper;



    @Override
    public Page<SysPost> getPostPage(Long current, Long size, String postName, String postCode, String status) {
        return postMapper.selectPostPage(new Page<>(current,size), postName,postCode,status);
    }

    @Override
    public List<SysPost> selectPostlist(Long postId) {
        List<SysPost> sysPostList = postMapper.selectPostList(postId);
        return sysPostList;
    }

    @Override
    public void deletePost(Long[] postIds) {
        postMapper.deletePost(postIds);
    }
}
